package net.chenlin.dp.modules.base.manager.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import net.chenlin.dp.common.entity.Page;
import net.chenlin.dp.common.entity.Query;
import net.chenlin.dp.modules.base.dao.SysPartMapper;
import net.chenlin.dp.modules.base.entity.SysPartEntity;
import net.chenlin.dp.modules.base.manager.SysPartManager;

/**
 * 零件
 *
 * @author ZhouChenglin
 * @email yczclcn@163.com
 * @url www.chenlintech.com
 * @date 2018年12月03日 下午9:49:25
 */
@Component("sysPartManager")
public class SysPartManagerImpl implements SysPartManager {

	@Autowired
	private SysPartMapper sysPartMapper;
	

	@Override
	public List<SysPartEntity> listSysPart(Page<SysPartEntity> page, Query search) {
		return sysPartMapper.listForPage(page, search);
	}

	@Override
	public int saveSysPart(SysPartEntity sysPart) {
		return sysPartMapper.save(sysPart);
	}

	@Override
	public SysPartEntity getSysPartById(Long id) {
		SysPartEntity sysPart = sysPartMapper.getObjectById(id);
		return sysPart;
	}

	@Override
	public int updateSysPart(SysPartEntity sysPart) {
		return sysPartMapper.update(sysPart);
	}

	@Override
	public int batchRemove(Long[] id) {
		int count = sysPartMapper.batchRemove(id);
		return count;
	}
	
}
